home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1630 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  5.8 KB

  1. Path: zeus.clr.com!not-for-mail
  2. From: phil@zeus.clr.com (Phil Howard)
  3. Newsgroups: comp.edu,comp.lang.c,comp.lang.c++
  4. Subject: Re: C or C++ for a 14-year old?
  5. Date: 11 Jan 1996 18:42:39 -0600
  6. Organization: fasttax.com
  7. Message-ID: <4d4apv$go7@zeus.clr.com>
  8. References: <4b30ld$lp2$1@mhafc.production.compuserve.com> <w31V7MD4ED1aLz3@dexam.another.gun.de> <dschrage.23.152EBB70@indirect.com> <4cq6cr$t51@dub-news-svc-1.compuserve.com> <4cqhu3$1quo@news.gate.net>
  9. NNTP-Posting-Host: zeus.clr.com
  10.  
  11. bhutto@gate.net (William Hutto) writes:
  12.  
  13. | In article <4cq6cr$t51@dub-news-svc-1.compuserve.com>,
  14.  
  15. ...
  16.  
  17. | >    My choice would be C++, for two simple reasons:  With a porper string
  18. | >classs, you eliminate the need for C's rather insane "string as an
  19. | >array of really tiny integers" model, the #1 cause of trouble among
  20. | >beginning C programmer.  In fact, with a standard class library that's
  21. | >in any way competnet, you can virtually do with any pointers in your
  22. | >code (the #2 cause of trouble).  And with new/delete with those rare
  23. | >cases where you insist on having a pointer, you avoid the troble of
  24. | >malloc/free (#3 cause of trouble...)
  25. | >
  26. |
  27. | What am I doing in this thread??? 
  28. |
  29. |     I would recommend either BASIC or batch programming. Not for long 
  30. | though. The first ideology of programming is setting down a list of 
  31. | instructions for the system to carry out. When it comes to sequential flow, 
  32. | BASIC or batch processing would be the easiest to learn in my opinion; and 
  33. | with that learning comes the confidence of achievement, considering the 
  34. | student has generated something useful. They could then go on to learn 
  35. | conditional expressions and loops, and even subprograms. 
  36.  
  37. ...
  38.  
  39. |     The ultimate *destination* might be a commonly used/accepted language. 
  40. | I went from BASIC to 6502 assembly language, 8086 assembly language, C, C++ 
  41. | and then Pascal. When I got to Pascal I thought, "Oops, wrong way!" 
  42. |     I almost wanted to say, start with assembler. Coming from assembler, I 
  43. | really understand what's happening with C (pointers took me about 5 minutes to 
  44. | understand). That is, I'm much more understanding of the efficiency of the C 
  45. | language. With C++, it's somehow vague as to just what the compiler is going 
  46. | to generate. I don't want to spend time learning the compiler's quirks. I'm 
  47. | much more *in tune* with the physical or *real* aspects of *the machine* and 
  48. | C++ is rather abstract. Although, on the other hand, C++ was a good lesson 
  49. | for me in abstraction and it's benefits, and is superb for modeling the *real* 
  50. | world as well as the GUI.
  51.  
  52.  
  53. Depending on the intelligence and learning speed of the student, the course
  54. through assembly may be better.  Anyone wanting to design hardware, drivers,
  55. operating systems, and some kinds of library code, as well as system
  56. administrators that want to really know what is going on under the hood,
  57. I highly recommend assembly/machine language.
  58.  
  59. Once the student understands the basic idea that the computer can follow
  60. instructions and does them literally, and when an environment can be had
  61. to allow one to build up from code segments to full machine language
  62. programs, then they should learn this programming.  I would recommend
  63. learning both a CISC (80x86 or 680x0) and a RISC (AXP, MIPS, PPC, etc)
  64. machine.
  65.  
  66. Then come back and learn C/C++.  Once assembly is mastered and understood,
  67. things like arrays if bitty little integers, and incrementing pointers and
  68. such will fall into place.  I learned C after I had learned assembly on
  69. about 4 different machines, and I never had a problem with pointers or
  70. arrays at all.  So, yes, that experience can make a big difference.
  71.  
  72. At the same time the student needs to remain aware of, and be able to work
  73. with, abstract concepts.  One is doing well to implement linked lists and
  74. binary search trees in assembly.  I've done that (including the trick with
  75. XOR'd pointers to implement doubly linked lists with one pointer per node).
  76. I'd even dabbled around in object oriented programs in assembly.  Remember,
  77. object oriented programming is a abstract attitude and object oriented
  78. languages are just tools to do that with.  You don't need C++ or other OOPs
  79. to do OO programming, though it is usually easier if you are just doing
  80. applications.
  81.  
  82. You should try to get an understanding of the student's goals to determine
  83. just what level they need to be learning at.  Maybe they need to be building
  84. digital circuits!
  85.  
  86. I remember when I was a kid in the 60's looking at these Heathkit project
  87. toys.  They were a flat pressboard of circuit parts.  Add batteries and
  88. clip wires into the springs attached to each part in the right arrangement
  89. and you have various circuits.  I got one for Christmas and learned much
  90. with it.
  91.  
  92. But there was one very interesting thing about the way I perceived this
  93. project kit BEFORE I got one.  Keep in mind I was about 7 years old at
  94. the time.
  95.  
  96. The picture was very unclear in the catalog and some of the words in the
  97. description I was still not good at reading.  I could see in the picture
  98. that parts could be wired together.  However I could not recognize most
  99. of the actual parts for what they were, yet, and didn't really understand
  100. the roles that things like resistors and capacitors play in circuits.
  101.  
  102. What I THOUGHT these parts were is switches!  I imagined doing projects
  103. with and-logic and or-logic and even xor-logic, although at age 7 in the
  104. early 60's, I had no names for these thoughts in my head.  I just wonder
  105. where I would be today had someone come along with a real digital circuits
  106. project toy and showed me how to program computers (punch boards would have
  107. been great for me then).
  108. -- 
  109. Phil Howard KA9WGN      +-------------------------------------------------+
  110. Unix/Internet/Sys Admin |    The enemy of my enemy is NOT my friend...    |
  111. CLR/Fast-Tax            |        ...but he is a convenient ally!          |
  112. phil@clr.com            +-------------------------------------------------+
  113.